package com.bao.springboot.mybatis.web;

import com.bao.springboot.mybatis.entity.User;
import com.bao.springboot.mybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ：baoliangquan
 * @date ：Created in 2019/11/18 0018 14:18
 * @description：
 * @modified By：
 * @version: $
 */
@RestController
@RequestMapping(value = "/user")
public class UserContorller {

    @Autowired
    private UserService userService;

    @GetMapping(value = "/all")
    public List<User> getAllUser(){
        return userService.getAllUser();
    }

}
